package com.aboverock.module.system.service;

import java.util.List;
import java.util.Set;

import com.baomidou.mybatisplus.extension.service.IService;
import com.aboverock.module.system.domain.RoleResource;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Rock Wang
 * @since 2018-04-10
 */
public interface RoleResourceService extends IService<RoleResource> {

    /**
     * 获取指定角色id下的所有资源id.
     *
     * @param roleId the role id
     * @return the resource ids by role id
     */
    public List<String> getResourceIdsByRoleId(String roleId);

    /**
     * 删除指定资源的所有role-resource关系映射.
     *
     * @param resourceIds the resource ids
     * @return true, if successful
     */
    public boolean removeByResourceIds(Set<String> resourceIds);

    /**
     * 删除某个角色与指定资源的role-resource关系映射.
     *
     * @param roleId the role id
     * @param resourceIds the resource ids
     * @return true, if successful
     */
    public boolean removeByRoleIdAndResourceIds(String roleId, List<String> resourceIds);
}
